<?php

namespace action\all;
use action\BaseDoc as ABase;

abstract class Base extends ABase {
    protected $_layout = '_doc.php';
    protected $fixTplPath = 'all';

    protected $model;
    /**
    * put your comment there...
    * 
    * @return \model\crm\crm
    */
    protected function getModel(){
        if($this->model) {
            return $this->model;
        }
        /** @var \model\all\All $model */
        $model = \model\all\All::getInstance();
        return $this->model = $model;
    }

    protected $siteId;

    protected function postAction(){
        parent::postAction();

        $project = new \model\project\Manager();
        $cond = ['alias' => sites()->getAlias()];
        $docInfo = $project->getInfo($cond);
        $this->assign('docInfo', $docInfo);
    }

    public function urldo($do = null, $args = []){
        $action = sites()->getAlias();
        if($do){
            $action .= '.' . $do;
        }
        return $this->url($action, $args);
    }
}